<?

function smarty_modifier_utf8_encode($string)
{
    if (mb_detect_encoding($string) != "UTF-8") {
        return mb_convert_encoding($string, "utf-8");
    }
    return $string;
}

?>